const typeArr = [
    { value: '1', label: '文本' },
    { value: '2', label: '开关' },
    { value: '3', label: '图片' },
    { value: '4', label: 'PDF' },
    { value: '5', label: '键值对' }
]

const getTypeName = (value) => {
    const arr = typeArr.filter(t => {
        return t.value === value
    }).map(t => {
        return t.label
    })
    return arr.length > 0 ? arr[0] : '-'
}

export {
    typeArr,
    getTypeName
}
